home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / c / mg_comm.com / TERM.C < prev   
Encoding:
C/C++ Source or Header  |  1990-03-13  |  234 b   |  16 lines

  1. #include "comm.h"
  2.  
  3. main()
  4. {
  5.     int i=0;
  6.     SetIntr(0);   /* Port 0 (COM1) */
  7.     PortInit(0,1200,0,8,1);
  8.     while(i!=27)
  9.     {
  10.         if(kbhit() && (i=getch()) != 0x1B)
  11.             Xmit(i);
  12.         if(SerAvl())
  13.             putch(GetSer());
  14.     }
  15.     ResetIntr(0);
  16. }